#!/bin/bash

spath=$(dirname $(realpath $BASH_SOURCE))
mkdir -p ~/.elvis

if [ "$spath" != ~/.elvis ]; then
    find . -maxdepth 1 \
           -not -path './.git/*' -not -path './.git' -not -path '.' \
           -not -name 'README.md' -not -name 'deploy.sh' -not -name 'LICENSE' \
           -exec echo cp -r {} ~/.elvis/ \; -exec cp -r {} ~/.elvis/ \;
    if [ $? -eq 0 ]; then
        echo 'deploy successful'
    else
        echo 'some errors occurred'
    fi
else
    echo 'illegal position'
fi
